package com.csyf.manager.dao;

import com.csyf.manager.entity.SysTradeType;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @Author: Enzo
 * @Date: 2018/3/29 17:55
 */
public interface SysTradeTypeDao extends Mapper<SysTradeType> {


    @Select("SELECT trade_type AS 'tradeType' FROM sys_trade_type WHERE mch_id = #{mchId} and status = 1 "  )
    List<SysTradeType> findExistTradeType(@Param("mchId") String mchId);


    void saveTradeType(List<SysTradeType> list);

    @Select("SELECT mch_id FROM sys_trade_type WHERE trade_type = #{tradeType}")
    List<SysTradeType> selectByTradeType(@Param("tradeType") String tradeType);
}
